package service.returns;

import relations.Associate;
import relations.belongsTo;
import relations.handle;
import relations.PaidWith;
import relations.Returns;
import dao.AlbumDAO;
import dao.AssociateDAO;
import dao.HandleDAO;
import dao.PaidWithDAO;
import dao.RecordDuplicateException;
import dao.ReturnsDAO;
import dao.belongsToDAO;
import entities.Customer;
import entities.User;
import entities.Album;
import entities.Order;



public class ReturnsServiceInMemory implements ReturnsService {

	public ReturnsServiceInMemory(){
		
	}
	
	public static ReturnsService newInstance(){
		return new ReturnsServiceInMemory();
	}
	
	/**
	 * Finds a Album based on the Album id.
	 * @param userid - user id
	 * @return the instance of the Album
	 */
	public Returns findReturns(String orderID, Long product_id, int qty, String dateDay, String dateMonth, String dateYear){
		ReturnsDAO db =  ReturnsDAO.getInstance();
		Returns result = null;
		result = db.findReturns(orderID, product_id, qty, dateDay, dateMonth, dateYear);
		return result;
	}
	
	
	/**
	 * Adds a new Album to the system.
	 * @param obj - the Album instance to add
	 */
	
	public void addReturns(Returns obj) throws RecordDuplicateException{
		ReturnsDAO db = ReturnsDAO.getInstance();	
		db.addReturns(obj);
		return;
	}











}
